<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
    </head>
    <body>
        <h2 id="cj">点击抽奖</h2>
        <button id="start">开始</button>
        <button id="over">结束</button>

        <script>
            var cj=document.getElementById("cj");
            var start=document.getElementById("start");
            var over=document.getElementById("over");
            var user=["张俊杰","李骏杰","叶伟明","黄云昊","王伟源","何嘉强","张一泓"]
            var timer;
            start.onclick=function(){
                clearInterval(timer)
                timer=setInterval(function(){
                    var c=parseInt(Math.random()*user.length);
                    cj.innerHTML=user[c];
                },110)
            }
            end.onclick=function(){
                clearInterval(timer)
            }
        </script>
    </body>
</html>